package com.micro.frog.acct;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/** @EnableFeignClients 必不可少，使用此注解才能扫描到Feign接口，负责不会注入Beans
 *  @EnableFeignClients与 @ComponentScan有冲突
 *  如果两种注解都使用时，其中@EnableFeignClients会覆盖@ComponentScan中指定的目录，从而恢复到默认目录
解决方案 1.可以将bean放在和main启动类同级目录
2.可以在@EnableFeignClients中指定bean目录
 * @author :  ljh
 * @date : 2018/3/29
 **/
@EnableCaching
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.micro.frog")
@MapperScan(basePackages = "com.micro.frog.acct.**.dao")
public class MicroAcctApplication {
    public static void main(String[] args) {
        SpringApplication.run(MicroAcctApplication.class, args);
    }
}
